home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 2.iso / dist / fw_gimp.idb / usr / freeware / include / libgimp / gimpintl.h.z / gimpintl.h
Encoding:
C/C++ Source or Header  |  2002-07-08  |  2.3 KB  |  68 lines

  1. /* LIBGIMP - The GIMP Library                                                   
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball                
  3.  *
  4.  * gimpintl.h
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Lesser General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.             
  10.  *                                                                              
  11.  * This library is distributed in the hope that it will be useful,              
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of               
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU            
  14.  * Lesser General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Lesser General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22. #ifndef __GIMPINTL_H__
  23. #define __GIMPINTL_H__
  24.  
  25. #include <glib.h>
  26. #include <locale.h>
  27.  
  28. /* Copied from gnome-i18n.h by Tom Tromey <tromey@creche.cygnus.com>
  29.  * Heavily modified by Daniel Egger <Daniel.Egger@t-online.de>
  30.  * So be sure to hit me instead of him if something is wrong here
  31.  */ 
  32.  
  33. #ifdef G_OS_WIN32
  34. /* Don't use hardcoded path */
  35. #undef LOCALEDIR
  36. #define LOCALEDIR g_strconcat (gimp_toplevel_directory (), \
  37.                    "\\lib\\locale", \
  38.                    NULL)
  39. #endif /* G_OS_WIN32 */
  40.  
  41. #ifdef ENABLE_NLS
  42. #    include <libintl.h>
  43. #    define _(String) gettext (String)
  44. #    ifdef gettext_noop
  45. #        define N_(String) gettext_noop (String)
  46. #    else
  47. #        define N_(String) (String)
  48. #    endif
  49. #else
  50. /* Stubs that do something close enough.  */
  51. #    define textdomain(String) (String)
  52. #    define gettext(String) (char *) (String)
  53. #    define dgettext(Domain,Message) (char *) (Message)
  54. #    define dcgettext(Domain,Message,Type) (char *) (Message)
  55. #    define bindtextdomain(Domain,Directory) (Domain)
  56. #    define _(String) (String)
  57. #    define N_(String) (String)
  58. #endif
  59.  
  60. #define INIT_LOCALE( domain )    G_STMT_START{    \
  61.     gtk_set_locale ();            \
  62.     setlocale (LC_NUMERIC, "C");        \
  63.     bindtextdomain (domain, LOCALEDIR);    \
  64.     textdomain (domain);            \
  65.                 }G_STMT_END
  66.  
  67. #endif /* __GIMPINTL_H__ */
  68.